#include <stdio.h>
const int MAX = 3;
int main()
{
	int var[] = {10, 100, 1000};
	int *ptr;
	ptr = var; /*指向数组地址 */
	int i = 0;
	while (ptr <= &var[MAX - 1])
	{
		printf("The address: var[%d] = %p\n", i, ptr);
		printf("The value stored in the address: var[%d] = %d\n", i, *ptr);
		ptr++; /*指向下一个位置*/
		i++;   /*下标*/
	}
	return 0;
}
